package cn.wwcyc.mapper;

import cn.wwcyc.domain.TjDev;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.SelectKey;

import java.util.List;

/**
* @author ad
* @description 针对表【TJ_DEV】的数据库操作Mapper
* @createDate 2024-05-02 21:22:09
* @Entity cn.wwcyc.domain.TjDev
*/
@Mapper
public interface TjDevMapper extends BaseMapper<TjDev> {

    List<TjDev> selectPagewithdwdevtype(long current, long size, Long dwid,Long devtype, String devname);

    List<TjDev> selectPagewithObj(long current, long size, List<Long> dwIdList, Long devtype, String devname);
    @Insert("INSERT INTO TJ_DEV (name, ip, devtype, dwid) VALUES (#{name}, #{ip}, #{devtype}, #{dwid})")
    @SelectKey(statement = "SELECT  SEQ_TJ_DEV.CURRVAL FROM dual", keyProperty = "id", before = false, resultType = long.class)
    void insertDev(TjDev tjDev1);
}




